package cn.caojun.sys.service.impl;

import cn.caojun.sys.domain.Dictionary;
import cn.caojun.sys.domain.Dictionaryitem;
import cn.caojun.sys.mapper.DictionaryMapper;
import cn.caojun.sys.service.IDictionaryService;
import cn.caojun.basic.service.impl.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author caojun
 * @since 2023-05-09
 */
@Service
public class DictionaryServiceImpl extends BaseServiceImpl<Dictionary> implements IDictionaryService {

    @Autowired
    DictionaryMapper dictionaryMapper;

    @Override
    public List<Dictionary> getTree() {
        return dictionaryMapper.getTree();
    }

//    @Override
//    public void removeById(Serializable id) {
//        Dictionary dictionary=dictionaryMapper.loadById(id);
//        Long parentId=dictionary.getId();
//        List<Dictionaryitem> dictionaryItemList=dictionaryMapper.deleteChildrenById(parentId);
//    }
}
